import { defineConfig } from 'vite'
import Components from "unplugin-vue-components/vite"
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
import vue from '@vitejs/plugin-vue'
import path from 'path'           // 新增

// https://vitejs.dev/config/
export default defineConfig({
  base: "./", // 新增
  // base: path.resolve(__dirname, './src/'), // 新增
  plugins: [vue(),
  Components({
    resolvers: [
      AntDesignVueResolver()
    ]
  })],

  resolve: {
    alias: {
      '@': path.resolve(__dirname, "src")
    }
  }

})
